package com.meessiom.train.crm.fundsrecoverymanagement.repository;


import com.meessiom.train.crm.fundsrecoverymanagement.model.Fundsrecoverymanagement;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface FundsrecoverymanagementRepository extends JpaRepository<Fundsrecoverymanagement, Long>, JpaSpecificationExecutor {
    @Query(value = "select relatedCustomer from fundsrecoverymanagement where id = ?", nativeQuery = true)
    public String GetFundsrecoverymanagementById(Long id);



    public List<Fundsrecoverymanagement> findByRelatedCustomerLikeAndRelatedOrderLike
            (
             @Param("relatedCustomer") String relatedCustomer,@Param("relatedOrder") String relatedOrder

             );
}
